import React, { Component } from 'react';
import {
  BrowserRouter as Router,
  Route,
  Switch,
  Redirect,
  // Link
} from 'react-router-dom';
import Home from '../containers/Home';
import City from '../containers/City';
import Search from '../containers/Search';

class RouterWrapper extends Component {
  render() {
    return (
      <Router>
        <Switch>
          <Route exact path='/home' component={Home}/>
          <Route path='/city' component={City}/>
          <Route path='/search/:page/:type/:keyword' conponent={Search} />
          <Redirect to='/home' />
        </Switch>
      </Router>
    )
  }
}

export default RouterWrapper;
